]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ShellPerfLog: Use monotonic timestamps for logging
authorOwen W. Taylor <otaylor@fishsoup.net>
Thu, 5 Jun 2014 19:08:29 +0000 (15:08 -0400)
committerOwen W. Taylor <otaylor@fishsoup.net>
Wed, 16 Jul 2014 14:33:59 +0000 (10:33 -0400)
Use g_get_monotonic_time() (that is, CLOCK_MONOTONIC) timestamps,
rather than gettimeofday() values.

https://bugzilla.gnome.org/show_bug.cgi?id=732350

src/shell-perf-log.c

index 6c1f293ce5f74b654168f14a69dfe1bd09ca13e7..ab78deddc8ab47187e34bfe35107d5d24c7707be 100644 (file)
@@ -126,11 +126,7 @@ G_DEFINE_TYPE(ShellPerfLog, shell_perf_log, G_TYPE_OBJECT);
 static gint64
 get_time (void)
 {
-  GTimeVal timeval;
-
-  g_get_current_time (&timeval);
-
-  return timeval.tv_sec * G_GINT64_CONSTANT(1000000) + timeval.tv_usec;
+  return g_get_monotonic_time ();
 }
 
 static void